package com.hxd.otc.common.enums;

/**
 * Created by lzy on 2018/12/25 0025.
 * description ${归属地枚举}
 */
public enum MessageTypeEnum {
    //1、OTC交易 2、便民服务 3、无感支付 4、通兑 5、币币兑换 6、其他
    OTC_EXCHANGE("1", "OTC交易"), CONVENIENCE("2", "便民服务"), NON_INDUCTIVE_PAY("3", "无感支付"),
    CIRCULATE_OR_EXCHANGE("4", "通兑"), COIN_EXCHANGE("5", "币币兑换"), OTHER("6", "其他");

    private final String mValue;
    private final String mDesc;

    MessageTypeEnum(String value, String desc) {
        mValue = value;
        mDesc = desc;
    }

    public String getValue() {
        return mValue;
    }

    public String getDesc() {
        return mDesc;
    }

    public static MessageTypeEnum getInstance(String value) {
        for (MessageTypeEnum messageTypeEnum : MessageTypeEnum.values()) {
            if (messageTypeEnum.getValue().equals(value)) return messageTypeEnum;
        }
        return OTHER;
    }
}
